ALMaSS  1.0
The Animal, Landscape and Man Simulation System
Vole_JuvenileFemale Class Reference

The class for female voles. More...

#include <vole_all.h>

Inheritance diagram for Vole_JuvenileFemale:
Vole_Base TAnimal TALMaSSObject Vole_Female

Public Member Functions

 Vole_JuvenileFemale (struct_Vole_Adult *p_aVoleStruct)
 Vole_JuvenileFemale constructor. More...
virtual void ReInit (struct_Vole_Adult *p_aVoleStruct)
virtual ~Vole_JuvenileFemale ()
virtual bool OnFarmEvent (FarmToDo event)
 External event handler. More...
virtual void BeginStep ()
 Female vole BeginStep. More...
virtual void Step ()
 JuvenileFemale vole Step. More...
virtual void EndStep ()
 Female vole EndStep. More...
virtual void OnKilled ()
 Death from external entity. More...
- Public Member Functions inherited from Vole_Base
 Vole_Base (struct_Vole_Adult *p_aVoleStruct)
 Constructor for Vole_Base. More...
virtual ~Vole_Base ()
virtual void Init (struct_Vole_Adult *p_aVoleStruct)
void st_Dying ()
 All voles end here on death. More...
void SetBreedingSeason (bool a_flag)
 Set Breeding Season flag. More...
void SetWeight (double W)
void Setm_Mature ()
void Set_BirthYear (int BirthYear)
void Set_MotherId (unsigned MotherIdNo)
void Set_FatherId (unsigned FatherIdNo)
void Set_NoYoungTot (int a_NoOfYoung)
void Set_XBorn (int a_Location_x)
void Set_YBorn (int a_Location_y)
void Set_ElemBorn (int a_Location_x, int a_Location_y)
void Set_VegBorn (int a_Location_x, int a_Location_y)
void Set_PolyRefBorn (int a_Location_x, int a_Location_y)
void Set_Age (int Age)
virtual int WhatState ()
bool SupplyBornLastYear ()
 Were we born this year? More...
bool SupplyTerritorial ()
int SupplyFatherId ()
int SupplyMotherId ()
bool SupplySex ()
int SupplyBirthYear ()
int SupplyTotNoYoung ()
int SupplyXBorn ()
int SupplyYBorn ()
int SupplyPolyRefBorn ()
int SupplyElemBorn ()
TTypesOfLandscapeElement SupplyElemType ()
int SupplyVegBorn ()
int SupplyTerrRange ()
double SupplyWeight ()
int SupplyIDNo ()
bool SupplyMature ()
int SupplyDeathCause ()
unsigned SupplyAge ()
unsigned SupplyX ()
unsigned SupplyY ()
bool SupplyInTrap ()
InTrapPosition SupplyTrapPosition ()
void SetFree ()
int SupplyHomoZyg ()
int SupplyHeteroZyg ()
int SupplyAllele (int locus, int allele)
uint32 SupplyMyAllele (int i, int j)
int GetGeneticFlag ()
int GetDirectFlag ()
void SetGeneticFlag ()
void SetDirectFlag ()
void UnsetGeneticFlag ()
void UnsetDirectFlag ()
GeneticMaterial SupplyGenes ()
virtual bool MortalityTest ()
 Do a mortality test. More...
void CopyMyself (VoleObject a_vole)
 Duplicates a vole. More...
void SetFertile (bool f)
 Set the male vole fertility. More...
bool GetFertile ()
 Get the male vole fertility. More...
- Public Member Functions inherited from TAnimal
unsigned SupplyFarmOwnerRef ()
AnimalPosition SupplyPosition ()
APoint SupplyPoint ()
int SupplyPolygonRef ()
int Supply_m_Location_x ()
int Supply_m_Location_y ()
virtual void KillThis ()
virtual void CopyMyself ()
void SetX (int a_x)
void SetY (int a_y)
 TAnimal (int x, int y, Landscape *L)
virtual void ReinitialiseObject (int x, int y, Landscape *L)
 Used to re-use an object - must be implemented in descendent classes. More...
virtual void Dying ()
void CheckManagement (void)
void CheckManagementXY (int x, int y)
- Public Member Functions inherited from TALMaSSObject
int GetCurrentStateNo ()
 Returns the current state number. More...
void SetCurrentStateNo (int a_num)
 Sets the current state number. More...
bool GetStepDone ()
 Returns the step done indicator flag. More...
void SetStepDone (bool a_bool)
 Sets the step done indicator flag. More...
virtual void ReinitialiseObject ()
 Used to re-use an object - must be implemented in descendent classes. More...
 TALMaSSObject ()
 The constructor for TALMaSSObject. More...
virtual ~TALMaSSObject ()
 The destructor for TALMaSSObject. More...
void OnArrayBoundsError ()
 Used for debugging only, tests basic object properties. More...

Protected Member Functions

int Dispersal (double p_OldQual, int p_Distance)
 Female dispersal. More...
int st_Evaluate_n_Explore ()
 Main territory evaluation behaviour. More...
void st_BecomeSubAdult (void)
virtual void SetLocation ()
 Location map function. More...
virtual void FreeLocation ()
 Location map function. More...
virtual bool GetLocation (int px, int py)
 Location map function. More...
- Protected Member Functions inherited from Vole_Base
virtual void RodenticideIngestion (void)
double CalculateCarryingCapacity (int x, int y, int a_ddep)
int MoveQuality (int p_x, int p_y)
 Test a location for quality while moving. More...
void MoveTo (int p_Vector, int p_Distance, int iterations)
 Movement. More...
void DoWalking (int p_Distance, int &p_Vector, int &vx, int &vy)
 Walking. More...
void DoWalkingCorrect (int p_Distance, int &p_Vector, int &vx, int &vy)
 Walking where there is a danger of stepping off the world. More...
void Escape (int p_Vector, int p_Distance)
 Dispersal - directed movement. More...
void CheckTraps ()
- Protected Member Functions inherited from TAnimal
void CorrectWrapRound ()
 Corrects wrap around co-ordinate problems. More...

Additional Inherited Members

- Public Attributes inherited from Vole_Base
TTypeOfVoleState CurrentVState
- Protected Attributes inherited from Vole_Base
int m_BirthYear
bool m_BornLastYear
 A flag set if the female was born the year before. More...
unsigned int m_MinTerrRange
unsigned m_MotherId
unsigned m_FatherId
int m_Death
int m_TerrRange
bool m_Sex
bool m_Mature
int m_Age
int m_XBorn
int m_YBorn
int m_PolyRefBorn
int m_ElemBorn
int m_VegBorn
int m_LifeSpan
double m_Weight
bool m_fertile
 Flag indicating the fertility state (true means fertile)
int m_NoOfYoungTotal
int m_DispVector
bool m_Have_Territory
int m_Reserves
unsigned IDNo
int SimH
int SimW
GeneticMaterial m_MyGenes
InTrapPosition m_intrappos
- Protected Attributes inherited from TAnimal
int m_Location_x
int m_Location_y
- Protected Attributes inherited from TALMaSSObject
int m_CurrentStateNo
 The basic state number for all objects - '-1' indicates death. More...
bool m_StepDone
 Indicates whether the iterative step code is done for this timestep. More...
- Static Protected Attributes inherited from Vole_Base
static unsigned int m_MaxMaleTerritorySize = 0
static unsigned int m_MaxFemaleTerritorySize = 0
static unsigned int m_MinMaleTerritorySize = 0
static unsigned int m_MinFemaleTerritorySize = 0
static double m_MinFVoleHabQual = 0
static double m_MinJMVoleHabQual = 0
static double m_MinMVoleHabQual = 0
static double m_MaleTerritoryRangeSlope = 0
static double m_FemaleTerritoryRangeSlope = 0
static double m_FHabQualThreshold3
static double m_FHabQualThreshold2
static double m_FHabQualThreshold1
static double m_MHabQualThreshold3
static double m_MHabQualThreshold2
static double m_MHabQualThreshold1
static bool m_BreedingSeason = false

Detailed Description

The class for female voles.

Contains all the behaviour specific to the female vole. The differences between the male and female are primarily in female reproductive behaviour, but there are small differences in other behaviours requiring re-implementation of many of the behaviours (e.g. dispersal).

Constructor & Destructor Documentation

◆ Vole_JuvenileFemale()

Vole_JuvenileFemale::Vole_JuvenileFemale ( struct_Vole_Adult p_aVoleStruct)

Vole_JuvenileFemale constructor.

1349  :Vole_Base(p_aVoleStruct)
1350 {
1351  m_Sex=false;
1354  m_BornLastYear= false;
1356  m_Age=14;
1358  m_maturitydelay = 0.0;
1359 #endif
1360 }
const int WeanedWeight
Definition: Vole_all.cpp:131
Vole_Base(struct_Vole_Adult *p_aVoleStruct)
Constructor for Vole_Base.
Definition: Vole_all.cpp:228
bool m_Sex
Definition: vole_all.h:174
double m_Weight
Definition: vole_all.h:192
unsigned int m_MinTerrRange
Definition: vole_all.h:164
int m_Age
Definition: vole_all.h:178
static unsigned int m_MinFemaleTerritorySize
Definition: vole_all.h:222
int m_TerrRange
Definition: vole_all.h:172
bool m_BornLastYear
A flag set if the female was born the year before.
Definition: vole_all.h:162

References Vole_Base::m_Age, Vole_Base::m_BornLastYear, Vole_Base::m_MinFemaleTerritorySize, Vole_Base::m_MinTerrRange, Vole_Base::m_Sex, Vole_Base::m_TerrRange, Vole_Base::m_Weight, and WeanedWeight.

◆ ~Vole_JuvenileFemale()

Vole_JuvenileFemale::~Vole_JuvenileFemale ( )
1379 {
1380  // Nothing to do
1381 }

Member Function Documentation

◆ BeginStep()

void Vole_JuvenileFemale::BeginStep ( void  )

Female vole BeginStep.

The BeginStep is one of the three timestep divisions. This is called once for each vole before Step and EndStep.
The main function here is to remove voles that die before they take up CPU resources in the Step code.
Can also be used to check for pesticide accumulation levels in pesticide simulation

Reimplemented from Vole_Base.

1394 {
1395  if (MortalityTest())
1396  {
1398  m_StepDone=true;
1400  }
1401  else
1402  {
1403  if (--m_LifeSpan<1)
1404  {
1407  m_StepDone=true;
1408  }
1409  }
1411  PesticideIngestion();
1412  ActOnPesticideDose();
1413 #endif
1414  }
CfgBool cfg_RecordVoleMort
@ tovmort_FLife
Definition: VolePopulationManager.h:84
@ tovmort_FBck
Definition: VolePopulationManager.h:76
bool value(void)
Definition: configurator.h:135
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:118
virtual bool MortalityTest()
Do a mortality test.
Definition: Vole_all.cpp:362
Vole_Population_Manager * m_OurPopulation
Definition: vole_all.h:408
int m_LifeSpan
Definition: vole_all.h:190
TTypeOfVoleState CurrentVState
Definition: vole_all.h:407
VoleSummaryOutput * m_VoleRecordMort
Definition: VolePopulationManager.h:197
void ChangeData(int a_data, int a_value)
Definition: VolePopulationManager.cpp:4048
@ tovs_FDying
Definition: vole_all.h:73

References cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), Vole_Base::CurrentVState, Vole_Base::m_LifeSpan, Vole_Base::m_OurPopulation, TALMaSSObject::m_StepDone, Vole_Population_Manager::m_VoleRecordMort, Vole_Base::MortalityTest(), tovmort_FBck, tovmort_FLife, tovs_FDying, and CfgBool::value().

◆ Dispersal()

int Vole_JuvenileFemale::Dispersal ( double  p_OldQual,
int  p_Distance 

Female dispersal.

Checks p_Distance away to see if it can find a territory in the next FHabQualThreshold category or with an improved quality of 1.1* p_OldQual if already in optimal habitat
This entails some risk though, so there is a fixed 2.5% increase in the mortality chance when it does this.

1818 {
1819  // Returns 1 for die, 0 for carry on
1820  if (m_DispVector == -1) m_DispVector = random(8); // Choose direction 0-7
1821  // Go that far in that direction (assuming it is possible to do that)
1822  int oldx = m_Location_x;
1823  int oldy = m_Location_y;
1824  MoveTo(m_DispVector, p_Distance,10);
1825  // Now we are there so what is the new quality
1826  // 1. Get the carrying capacity
1828  if ( CC <= p_OldQual )
1829  {
1830  // Don't want to move
1831  FreeLocation();
1832  m_Location_x=oldx;
1833  m_Location_y=oldy;
1834  SetLocation();
1835  }
1836  else
1837  {
1838  if (g_rand_uni() < g_extradispmort )
1839  {
1841  return 1;
1842  }
1843  }
1844  return 0;
1845 }
int random(int a_range)
Definition: ALMaSS_CmdLine.cpp:142
double g_extradispmort
Definition: Vole_all.cpp:204
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
CfgInt cfg_VoleDDepConst("VOLE_DDEPCONST", CFG_CUSTOM, 4)
@ tovmort_FDisp
Definition: VolePopulationManager.h:80
int value(void)
Definition: configurator.h:98
int m_Location_y
Definition: PopulationManager.h:228
int m_Location_x
Definition: PopulationManager.h:225
double CalculateCarryingCapacity(int x, int y, int a_ddep)
Definition: Vole_all.cpp:384
int m_DispVector
Definition: vole_all.h:202
void MoveTo(int p_Vector, int p_Distance, int iterations)
Definition: Vole_all.cpp:907
virtual void FreeLocation()
Location map function.
Definition: Vole_all.cpp:1792
virtual void SetLocation()
Location map function.
Definition: Vole_all.cpp:1785

References Vole_Base::CalculateCarryingCapacity(), cfg_RecordVoleMort, cfg_VoleDDepConst, VoleSummaryOutput::ChangeData(), FreeLocation(), g_extradispmort, g_rand_uni, Vole_Base::m_DispVector, TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_OurPopulation, Vole_Population_Manager::m_VoleRecordMort, Vole_Base::MoveTo(), random(), SetLocation(), tovmort_FDisp, CfgInt::value(), and CfgBool::value().

Referenced by st_Evaluate_n_Explore(), and Vole_Female::st_Evaluate_n_Explore().

◆ EndStep()

void Vole_JuvenileFemale::EndStep ( void  )

Female vole EndStep.

The EndStep one of the three timestep divisions. This is called once for each vole after BeginStep and Step.
The main function here is to remove voles that have died during step and otherwise to grow if not at max weight. It also checks if the vole was killed due to human management and determines the potential territory size.

Reimplemented from Vole_Base.

1475 {
1476 #ifdef __VoleStarvationDays
1477  if ( m_StarvationDays > m_MaxStarvationDays)
1478  {
1479  st_Dying();
1481  }
1482 #endif
1483  CheckManagement();
1484  if (CurrentVState==tovs_FDying) {
1485  st_Dying();
1486  }
1488  else
1489  {
1490  m_Age++;
1493  Female vole grows until 20g.
1494  After that she will only grow if he has matured
1495  Growth continues up to 55g.
1497  Reproduction cannot occur below 20g or 20 days
1499  Growth only occurs between 1 March and 1st August
1501  taken from Hanson L, 1977, Oikos 29.
1502  */
1503  int today=m_OurLandscape->SupplyDayInYear();
1504  if ((today<GrowStopDate) && (today>
1506  {
1507  if (m_Weight<20)
1508  {
1510  }
1511  else if ((m_Mature==true) && (m_Weight<MaxWeightF))
1512  {
1515  }
1516  }
1517  else if (today==1) m_BornLastYear=true; // must be true if alive on 1st Jan.
1518  }
1519 }
const int GrowStopDate
Definition: Vole_all.cpp:143
const double MaxWeightF
Definition: Vole_all.cpp:135
const int MinReproWeightF
Definition: Vole_all.cpp:151
const double growthperdayF
Definition: Vole_all.cpp:141
@ tovmort_FStarve
Definition: VolePopulationManager.h:74
int SupplyDayInYear(void)
Definition: landscape.h:1596
Landscape * m_OurLandscape
Definition: PopulationManager.h:229
void CheckManagement(void)
Definition: PopulationManager.cpp:1404
void st_Dying()
All voles end here on death.
Definition: Vole_all.cpp:348
bool m_Mature
Definition: vole_all.h:176
static double m_FemaleTerritoryRangeSlope
Definition: vole_all.h:232
int SupplyGrowthStartDate()
Definition: VolePopulationManager.h:237

References cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), TAnimal::CheckManagement(), Vole_Base::CurrentVState, GrowStopDate, growthperdayF, Vole_Base::m_Age, Vole_Base::m_BornLastYear, Vole_Base::m_FemaleTerritoryRangeSlope, Vole_Base::m_Mature, Vole_Base::m_MinFemaleTerritorySize, TAnimal::m_OurLandscape, Vole_Base::m_OurPopulation, Vole_Base::m_TerrRange, Vole_Population_Manager::m_VoleRecordMort, Vole_Base::m_Weight, MaxWeightF, MinReproWeightF, Vole_Base::st_Dying(), Landscape::SupplyDayInYear(), Vole_Population_Manager::SupplyGrowthStartDate(), tovmort_FStarve, tovs_FDying, and CfgBool::value().

◆ FreeLocation()

void Vole_JuvenileFemale::FreeLocation ( )

Location map function.

Reimplemented from Vole_Base.

1792  {
1794  };
void ClearMapValue(unsigned x, unsigned y)
Definition: MovementMap.h:108
IDMap< TAnimal * > * m_VoleMap
Definition: VolePopulationManager.h:284

References IDMap< a_type >::ClearMapValue(), TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_OurPopulation, and Vole_Population_Manager::m_VoleMap.

Referenced by Dispersal(), st_BecomeSubAdult(), Vole_Female::st_Special_Explore(), Step(), and Vole_Female::Step().

◆ GetLocation()

bool Vole_JuvenileFemale::GetLocation ( int  px,
int  py 

Location map function.

Reimplemented from Vole_Base.

1799  {
1800  if( m_OurPopulation->m_VoleMap->GetMapValue(px,py)!=NULL) return true;
1801  return false;
1802  };
a_type GetMapValue(unsigned x, unsigned y)
Definition: MovementMap.h:102

References IDMap< a_type >::GetMapValue(), Vole_Base::m_OurPopulation, and Vole_Population_Manager::m_VoleMap.

◆ OnFarmEvent()

bool Vole_JuvenileFemale::OnFarmEvent ( FarmToDo  event)

External event handler.

This method evaluates external events and chooses a suitable response (in this case a probability of dying because other effects will be taken up by the evaluate and explore state.

Reimplemented from TAnimal.

1530 {
1531  switch(event)
1532  {
1533 case sleep_all_day:
1534  break;
1535 case autumn_plough:
1538  break;
1539 case autumn_harrow:
1542  break;
1543 case autumn_roll:
1546  break;
1547 case autumn_sow:
1550  break;
1551 case winter_plough:
1554  break;
1555 case deep_ploughing:
1558  break;
1559 case spring_plough:
1562  break;
1563 case spring_harrow:
1566  break;
1567 case spring_roll:
1570  break;
1571 case spring_sow:
1574  break;
1575 case fp_npks:
1576  break;
1577 case fp_npk:
1578  break;
1579 case fp_pk:
1580  break;
1581 case fp_liquidNH3:
1582  break;
1583 case fp_slurry:
1584  break;
1586  break;
1587 case fp_manure:
1588  break;
1589 case fp_greenmanure:
1590  break;
1591 case fp_sludge:
1592  break;
1593 case fa_npk:
1594  break;
1595 case fa_pk:
1596  break;
1597 case fa_slurry:
1598  break;
1599 case fa_ammoniumsulphate:
1600  break;
1601 case fa_manure:
1602  break;
1603 case fa_greenmanure:
1604  break;
1605 case fa_sludge:
1606  break;
1607 case herbicide_treat:
1608  break;
1609 case growth_regulator:
1610  break;
1611 case fungicide_treat:
1612  break;
1613 case insecticide_treat:
1614  break;
1615 case molluscicide:
1616  break;
1617 case glyphosate:
1618  break;
1619 case row_cultivation:
1622  break;
1623 case strigling:
1626  break;
1627 case hilling_up:
1630  break;
1631 case water:
1632  break;
1633 case swathing:
1636  break;
1637 case harvest:
1640  break;
1641 case cattle_out:
1642 case cattle_out_low:
1643  break;
1644 case cut_to_hay:
1647  break;
1648 case cut_to_silage:
1651  break;
1652 case straw_chopping:
1655  break;
1656 case hay_turning:
1659  break;
1660 case hay_bailing:
1663  break;
1664 case stubble_harrowing:
1667  break;
1671  break;
1672 case burn_straw_stubble:
1675  break;
1676 case mow:
1679  break;
1680 case cut_weeds:
1683  break;
1684 case pigs_out:
1687  break;
1688 case strigling_sow:
1691  break;
1693 case trial_toxiccontrol:
1694 case trial_control:
1695  break;
1696 default:
1697  g_msg->Warn( WARN_FILE, "Vole_Female::OnFarmEvent(): Unknown event type:",
1699  exit( 1 );
1700  }
1702  {
1704  return true;
1705  }
1706  else
1707  return false;
1708 }
const double VoleStriglingMort
Definition: Vole_all.cpp:194
const double VoleSoilCultivationMort
Definition: Vole_all.cpp:196
const double VoleHarvestMort
Definition: Vole_all.cpp:192
const double VolePigGrazingMort
Definition: Vole_all.cpp:198
@ tovmort_FFarm
Definition: VolePopulationManager.h:78
std::string EventtypeToString(int a_event)
Definition: Landscape.cpp:3918
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: maperrormsg.cpp:59
class MapErrorMsg * g_msg
This pointer provides access the to the internal ALMaSS error message system.
Definition: maperrormsg.cpp:41
Definition: maperrormsg.h:37
@ burn_straw_stubble
Definition: treatment.h:92
@ autumn_harrow
Definition: treatment.h:37
@ swathing
Definition: treatment.h:81
@ fa_pk
Definition: treatment.h:62
@ winter_plough
Definition: treatment.h:42
@ strigling
Definition: treatment.h:77
@ fp_npks
Definition: treatment.h:48
@ glyphosate
Definition: treatment.h:102
@ fa_sludge
Definition: treatment.h:68
@ fp_liquidNH3
Definition: treatment.h:51
@ spring_roll
Definition: treatment.h:46
@ fa_greenmanure
Definition: treatment.h:67
@ spring_plough
Definition: treatment.h:44
@ molluscicide
Definition: treatment.h:75
@ hay_turning
Definition: treatment.h:88
@ autumn_roll
Definition: treatment.h:38
@ fp_manure
Definition: treatment.h:55
@ deep_ploughing
Definition: treatment.h:43
@ pigs_out
Definition: treatment.h:84
@ fa_npk
Definition: treatment.h:61
@ herbicide_treat
Definition: treatment.h:71
@ row_cultivation
Definition: treatment.h:76
@ spring_sow
Definition: treatment.h:47
@ fungicide_treat
Definition: treatment.h:73
@ fp_manganesesulphate
Definition: treatment.h:53
@ harvest
Definition: treatment.h:82
@ cut_to_silage
Definition: treatment.h:86
@ sleep_all_day
Definition: treatment.h:33
@ mow
Definition: treatment.h:93
@ fa_ammoniumsulphate
Definition: treatment.h:65
@ autumn_plough
Definition: treatment.h:34
@ straw_chopping
Definition: treatment.h:87
@ fa_manure
Definition: treatment.h:66
@ fp_greenmanure
Definition: treatment.h:56
@ fa_slurry
Definition: treatment.h:63
@ stubble_harrowing
Definition: treatment.h:90
@ hilling_up
Definition: treatment.h:79
@ growth_regulator
Definition: treatment.h:72
@ trial_control
Definition: treatment.h:98
@ insecticide_treat
Definition: treatment.h:74
@ trial_insecticidetreat
Definition: treatment.h:96
@ cattle_out_low
Definition: treatment.h:100
@ cut_to_hay
Definition: treatment.h:85
@ cut_weeds
Definition: treatment.h:94
@ fp_sludge
Definition: treatment.h:57
@ autumn_sow
Definition: treatment.h:41
@ fp_npk
Definition: treatment.h:49
@ fp_pk
Definition: treatment.h:50
@ trial_toxiccontrol
Definition: treatment.h:97
@ hay_bailing
Definition: treatment.h:89
@ spring_harrow
Definition: treatment.h:45
@ strigling_sow
Definition: treatment.h:95
@ cattle_out
Definition: treatment.h:83
@ fp_slurry
Definition: treatment.h:52
@ water
Definition: treatment.h:80
@ autumn_or_spring_plough
Definition: treatment.h:91

References autumn_harrow, autumn_or_spring_plough, autumn_plough, autumn_roll, autumn_sow, burn_straw_stubble, cattle_out, cattle_out_low, cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), Vole_Base::CurrentVState, cut_to_hay, cut_to_silage, cut_weeds, deep_ploughing, Landscape::EventtypeToString(), fa_ammoniumsulphate, fa_greenmanure, fa_manure, fa_npk, fa_pk, fa_sludge, fa_slurry, fp_greenmanure, fp_liquidNH3, fp_manganesesulphate, fp_manure, fp_npk, fp_npks, fp_pk, fp_sludge, fp_slurry, fungicide_treat, g_msg, g_rand_uni, glyphosate, growth_regulator, harvest, hay_bailing, hay_turning, herbicide_treat, hilling_up, insecticide_treat, TAnimal::m_OurLandscape, Vole_Base::m_OurPopulation, Vole_Population_Manager::m_VoleRecordMort, molluscicide, mow, pigs_out, row_cultivation, sleep_all_day, spring_harrow, spring_plough, spring_roll, spring_sow, straw_chopping, strigling, strigling_sow, stubble_harrowing, swathing, tovmort_FFarm, tovs_FDying, trial_control, trial_insecticidetreat, trial_toxiccontrol, CfgBool::value(), VoleHarvestMort, VolePigGrazingMort, VoleSoilCultivationMort, VoleStriglingMort, MapErrorMsg::Warn(), WARN_FILE, water, and winter_plough.

◆ OnKilled()

void Vole_JuvenileFemale::OnKilled ( )

Death from external entity.

External event has caused death - probably eaten by a explicitly modelled predator

Reimplemented from Vole_Base.

1719 {
1722 }
@ tovmort_FPred
Definition: VolePopulationManager.h:82

References cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), Vole_Base::CurrentVState, Vole_Base::m_OurPopulation, Vole_Population_Manager::m_VoleRecordMort, tovmort_FPred, tovs_FDying, and CfgBool::value().

◆ ReInit()

void Vole_JuvenileFemale::ReInit ( struct_Vole_Adult p_aVoleStruct)

Reimplemented from Vole_Base.

Reimplemented in Vole_Female.

1363  {
1364  Init(p_aVoleStruct);
1365  m_Sex = false;
1368  m_BornLastYear = false;
1370  m_Age = 14;
1372  m_maturitydelay = 0.0;
1373 #endif
1374 }
virtual void Init(struct_Vole_Adult *p_aVoleStruct)
Definition: Vole_all.cpp:240

References Vole_Base::Init(), Vole_Base::m_Age, Vole_Base::m_BornLastYear, Vole_Base::m_MinFemaleTerritorySize, Vole_Base::m_MinTerrRange, Vole_Base::m_Sex, Vole_Base::m_TerrRange, Vole_Base::m_Weight, and WeanedWeight.

◆ SetLocation()

void Vole_JuvenileFemale::SetLocation ( )

Location map function.

Reimplemented from Vole_Base.

1785  {
1787  };
void SetMapValue(unsigned x, unsigned y, a_type p)
Definition: MovementMap.h:105

References TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_OurPopulation, Vole_Population_Manager::m_VoleMap, and IDMap< a_type >::SetMapValue().

Referenced by Dispersal(), and Vole_Female::st_Special_Explore().

◆ st_BecomeSubAdult()

void Vole_JuvenileFemale::st_BecomeSubAdult ( void  )
1726 {
1727  struct_Vole_Adult* av;
1728  av = new struct_Vole_Adult;
1729  av->VPM = m_OurPopulation;
1730  av->L = m_OurLandscape;
1731  av->m_flag=true; // Used to signal pesticide effect to CreateObjects
1732  // Create the new voles (50% chance of male/female)
1736  av->FatherId = m_FatherId;
1737  av->MotherId = m_MotherId;
1738  av->x = m_Location_x;
1739  av->y = m_Location_y;
1740  av->weight = m_Weight;
1741  // Do the genetics
1742  av->Genes = m_MyGenes;
1743  av->age = m_Age;
1745  // Remove the current object
1747  FreeLocation();
1748  m_CurrentStateNo = -1;
1749  m_StepDone = true;
1750 }
int SupplyPolyRef(int a_x, int a_y)
Definition: landscape.h:1488
TTypesOfVegetation SupplyVegType(int a_x, int a_y)
Definition: landscape.h:1321
TTypesOfLandscapeElement SupplyElementType(int a_polyref)
Definition: landscape.h:1110
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: PopulationManager.h:116
unsigned m_MotherId
Definition: vole_all.h:166
GeneticMaterial m_MyGenes
Definition: vole_all.h:213
unsigned m_FatherId
Definition: vole_all.h:168
void CreateObjects(VoleObject ob_type, TAnimal *pvo, struct_Vole_Adult *as, int number)
Definition: VolePopulationManager.cpp:3455
A struct for passing data to create a new vole.
Definition: vole_all.h:123
int FatherId
Definition: vole_all.h:135
int age
Definition: vole_all.h:127
int y
Definition: vole_all.h:126
int MotherId
Definition: vole_all.h:136
GeneticMaterial Genes
Definition: vole_all.h:141
Vole_Population_Manager * VPM
Definition: vole_all.h:139
bool m_flag
Definition: vole_all.h:142
int ElemBorn
Definition: vole_all.h:132
int PolyRefBorn
Definition: vole_all.h:131
int x
Definition: vole_all.h:125
double weight
Definition: vole_all.h:128
int VegBorn
Definition: vole_all.h:133
Landscape * L
Definition: vole_all.h:138
@ vob_Female
Definition: vole_all.h:103

References struct_Vole_Adult::age, Vole_Population_Manager::CreateObjects(), Vole_Base::CurrentVState, struct_Vole_Adult::ElemBorn, struct_Vole_Adult::FatherId, FreeLocation(), struct_Vole_Adult::Genes, struct_Vole_Adult::L, Vole_Base::m_Age, TALMaSSObject::m_CurrentStateNo, Vole_Base::m_FatherId, struct_Vole_Adult::m_flag, TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_MotherId, Vole_Base::m_MyGenes, TAnimal::m_OurLandscape, Vole_Base::m_OurPopulation, TALMaSSObject::m_StepDone, Vole_Base::m_Weight, struct_Vole_Adult::MotherId, struct_Vole_Adult::PolyRefBorn, Landscape::SupplyElementType(), Landscape::SupplyPolyRef(), Landscape::SupplyVegType(), tovs_FDying, struct_Vole_Adult::VegBorn, vob_Female, struct_Vole_Adult::VPM, struct_Vole_Adult::weight, struct_Vole_Adult::x, and struct_Vole_Adult::y.

Referenced by Step().

◆ st_Evaluate_n_Explore()

int Vole_JuvenileFemale::st_Evaluate_n_Explore ( )

Main territory evaluation behaviour.

Evaluates the quality of her habitat and does some limited exploration in the surrounding area to see if she can improve it by moving.

1761 {
1762 #ifdef __USINGTRAPLINES
1763  CheckTraps();
1764 #endif
1766  // This function determines whether he must leave and whether he does
1767  // an explore. He will do this if he is not in optimal conditions
1769  if (Qual < m_MinFVoleHabQual)
1770  {
1771  // check an area MinFemaleMovement to FemaleMovement metres away
1772  m_DispVector = random(8);
1773  // Not quality dependent dispersal, very directed
1774  return Dispersal(-1, random(FemaleMovement) + 1);
1775  }
1776  else return (Dispersal(Qual, 1 + random(FemaleMovement) + 1)); // returns 1 if it has died of extra dispersal mortality or starvation
1777 }
const unsigned FemaleMovement
Definition: Vole_all.cpp:174
void CheckTraps()
Definition: Vole_all.cpp:2800
static double m_MinFVoleHabQual
Definition: vole_all.h:224
int Dispersal(double p_OldQual, int p_Distance)
Female dispersal.
Definition: Vole_all.cpp:1817

References Vole_Base::CalculateCarryingCapacity(), cfg_VoleDDepConst, Vole_Base::CheckTraps(), Dispersal(), FemaleMovement, Vole_Base::m_DispVector, TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_MinFVoleHabQual, random(), and CfgInt::value().

Referenced by Step().

◆ Step()

void Vole_JuvenileFemale::Step ( void  )

JuvenileFemale vole Step.

The Step is one of the three timestep divisions. This is called repeatedly after BeginStep and before EndStep, until all voles report that they are done with Step.

Most of the behaviours are controlled by moving voles between behavioural states in Step (for other models this is also done in BeginStep and EndStep).
When a vole is done for the day it will signal this by setting m_StepDone==true. NB that a call to one behaviour may trigger a call to another behaviour on the next call to step inside the same timestep. In this way a daily cycle of activity can be undertaken (i.e. do reproduction and explore)

Reimplemented from Vole_Base.

Reimplemented in Vole_Female.

1427 {
1428  if (m_StepDone) return;
1429  switch (CurrentVState)
1430  {
1431  case 0: // Initial state
1433  break;
1434  case tovs_FEvaluateExplore: // Evaluate & Explore
1435  switch(st_Evaluate_n_Explore())
1436  {
1437  case 1: // Dead from dispersal mortality
1438  CurrentVState=tovs_FDying; // Die
1439  break;
1440  case 2: // Starved
1442  CurrentVState=tovs_FDying; // Die
1443  break;
1444  default:
1445  ; // Do nothing
1446  }
1448  if (m_Age >= MinReproAgeF+ m_maturitydelay ) st_BecomeSubAdult();
1449 #else
1451 #endif
1452  m_StepDone=true;
1453  break;
1454  case tovs_FDying: // Die
1455  FreeLocation();
1456  m_StepDone=true;
1457  break;
1458  default:
1459  m_OurLandscape->Warn("Vole_Female::Step - unknown state",NULL);
1460  exit(9);
1461  }
1462 }
int MinReproAgeF
Definition: Vole_all.cpp:147
void Warn(std::string a_msg1, std::string a_msg2)
Definition: landscape.h:1579
void st_BecomeSubAdult(void)
Definition: Vole_all.cpp:1725
int st_Evaluate_n_Explore()
Main territory evaluation behaviour.
Definition: Vole_all.cpp:1760
@ tovs_FEvaluateExplore
Definition: vole_all.h:65

References cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), Vole_Base::CurrentVState, FreeLocation(), Vole_Base::m_Age, TAnimal::m_OurLandscape, Vole_Base::m_OurPopulation, TALMaSSObject::m_StepDone, Vole_Population_Manager::m_VoleRecordMort, MinReproAgeF, st_BecomeSubAdult(), st_Evaluate_n_Explore(), tovmort_FStarve, tovs_FDying, tovs_FEvaluateExplore, CfgBool::value(), and Landscape::Warn().

The documentation for this class was generated from the following files: